package edu.hwadee.BEIS.entity;
// default package

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CityUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "city_user", catalog = "beis")

public class CityUser implements java.io.Serializable {

	// Fields

	private String cityUserId;
	private Certificate certificate;
	private String cityUserPwd;
	private String cityUserPhone;
	private String cityEdbName;
	private String cityAddress;
	private String adminCode;

	// Constructors

	/** default constructor */
	public CityUser() {
	}

	/** minimal constructor */
	public CityUser(String cityUserId, Certificate certificate, String cityUserPwd, String cityUserPhone,
			String cityEdbName, String cityAddress, String adminCode) {
		this.cityUserId = cityUserId;
		this.certificate = certificate;
		this.cityUserPwd = cityUserPwd;
		this.cityUserPhone = cityUserPhone;
		this.cityEdbName = cityEdbName;
		this.cityAddress = cityAddress;
		this.adminCode = adminCode;
	}

	// Property accessors
	@Id

	@Column(name = "cityuser_id", unique = true, nullable = false, length = 50)

	public String getCityUserId() {
		return this.cityUserId;
	}

	public void setCityUserId(String cityUserId) {
		this.cityUserId = cityUserId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "certificate_id", nullable = false)

	public Certificate getCertificate() {
		return this.certificate;
	}

	public void setCertificate(Certificate certificate) {
		this.certificate = certificate;
	}

	@Column(name = "cityuser_pwd", nullable = false, length = 32)

	public String getCityUserPwd() {
		return this.cityUserPwd;
	}

	public void setCityUserPwd(String cityUserPwd) {
		this.cityUserPwd = cityUserPwd;
	}

	@Column(name = "cityuser_phone", nullable = false, length = 20)

	public String getCityUserPhone() {
		return this.cityUserPhone;
	}

	public void setCityUserPhone(String cityUserPhone) {
		this.cityUserPhone = cityUserPhone;
	}

	@Column(name = "city_edb_name", nullable = false, length = 20)

	public String getCityEdbName() {
		return this.cityEdbName;
	}

	public void setCityEdbName(String cityEdbName) {
		this.cityEdbName = cityEdbName;
	}

	@Column(name = "city_address", nullable = false, length = 50)

	public String getCityAddress() {
		return this.cityAddress;
	}

	public void setCityAddress(String cityAddress) {
		this.cityAddress = cityAddress;
	}

	@Column(name = "admin_code", nullable = false, length = 5)
	public String getAdminCode() {
		return this.adminCode;
	}

	public void setAdminCode(String adminCode) {
		this.adminCode = adminCode;
	}


}